//
//  HYQUploadImagesManager.h
//  HYQPhotoUploader
//
//  Created by __无邪_ on 2018/8/24.
//  Copyright © 2018 __无邪_. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <Photos/Photos.h>
#import "HYQUploaderConfig.h"

typedef void (^HYQUploaderResponseHandler)(NSString *errMsg, NSArray *results);
typedef void (^HYQUpLoaderProgressBlock)(int64_t completedBytesCount, int64_t totalBytesCount);

@interface HYQUploadImagesManager : NSObject

+ (instancetype)sharedManager;

@property (nonatomic, strong) HYQUploaderConfig *configurer;

//根据路径上传文件
- (void)uploadByFilePaths:(NSArray <NSString *>*)filePaths
                completed:(HYQUploaderResponseHandler)completed
                 progress:(HYQUpLoaderProgressBlock)progress;
//根据相册asset上传
- (void)uploadByPHAssets:(NSArray <PHAsset *>*)assets
                original:(BOOL)original
               completed:(HYQUploaderResponseHandler)completed
                progress:(HYQUpLoaderProgressBlock)progress;
//直接通过image上传
- (void)uploadByImages:(NSArray <UIImage *>*)images
             completed:(HYQUploaderResponseHandler)completed
              progress:(HYQUpLoaderProgressBlock)progress;

//上传文件，任意文件均可
- (void)uploadFileWithPath:(NSString *)filePath
                   success:(void (^)(NSString *target))successBlock
                   failure:(void (^)(NSString *errorMsg))failureBlock
                  progress:(HYQUpLoaderProgressBlock)progressBlock;

- (void)cancel;

+ (void)clearCache;

@end
